/**
 * Created by rockyren on 14/11/29.
 */

var personalApp = angular.module('personalApp',['ui.router','ui.bootstrap','commonServices','commonDirective', 'addressController']);

personalApp.config(['$stateProvider','$urlRouterProvider',
    function($stateProvider,$urlRouterProvider){
      var tplsUrl = 'ngApp/personal/tpls/';
      $urlRouterProvider.otherwise('/');

      $stateProvider
        .state('index',{
          url: '/',
          views: {
            '': {
              templateUrl: tplsUrl + 'index.html'
            },
            'sidebar@index': {
              template: '<sidebar></sidebar>'
            }
          }

        })
        .state('index.baseinfo',{
          url: 'baseinfo',
          views: {
            'content@index': {
              templateUrl: tplsUrl + 'baseinfo.html',
              controller: 'baseinfoController'
            }
          }
        })
        .state('index.address',{
          url: 'address',
          views: {
            'content@index': {
              templateUrl: tplsUrl + 'address.html',
              controller: 'addressController'
            }
          }
        })
        .state('index.order',{
          url: 'order',
          views: {
            'content@index': {
              templateUrl: tplsUrl + 'order.html'
            }
          }
        });
        /*
        .state('index.order.info', {
          url: '/:orderId',
          views: {
            '@': {
              templateUrl: tplsUrl + 'order-info.html'
            }
          }
        })*/
        /*
        .state('index.collection',{
          url: 'collection',
          views: {
            'content@index': {
              template: 'collection'
            }
          }
        })*/
    }
]);